Class symantec.itools.net.RelativeURL
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.net.RelativeURL

Object
   |
   +----symantec.itools.net.RelativeURL

public class RelativeURL
extends Object
This class is used in conjunction with class symantec.itools.OS.Context to provide URLs that are relative to an appletÆs or applicationÆs document base. For applets the document base is the URL of the document that the applet is embedded in. For applications the document base is the same as the ôuser.dirö system property.


Constructor Index

 o symantec.itools.net.RelativeURL()
DonÆt use, this is an all-static class.

Method Index

 o getURL(String)
Determines the absolute URL given a relative URL.
 o loadObject(Class, String)
Attempts to load an object from a .SER file.

Constructors

 o RelativeURL
public RelativeURL()
DonÆt use, this is an all-static class.

Methods

 o getURL
public static java.net.URL getURL(String spec) throws MalformedURLException
Determines the absolute URL given a relative URL. If the spec parameter is relative, it is considered to be relative to the current document base as determined by getDocumentBase() in class symantec.itools.lang.Context.

Parameters:
spec - a possibly relative URL
Returns:
the absolute URL equivalent to the given relativeURL
Throws: MalformedURLException
if cannot generate the resultant URL due to a bad spec parameter or a bad document base
 o loadObject
public static java.lang.Object loadObject(Class c,
                                          String serName)
Attempts to load an object from a .SER file.

Parameters:
Class - the class to be created
serName - the name of the serialization file
Returns:
the object created (or NULL, if any error occurred)

All Packages  Class Hierarchy  This Package  Previous  Next  Index